//
//  ImageItemView.h
//  PlayCatchGame
//
//  Created by 流言 on 2018/1/30.
//  Copyright © 2018年 清正. All rights reserved.
//

#import "BaseView.h"

#import "AppHeader.h"

typedef void(^HeightBlock)(CGFloat cellHeight);
typedef void(^ImageCountBlock)(NSMutableArray *imageArray);
typedef void(^ItemBlock)(NSInteger indexRow, BOOL isAdd);

@interface ImageItemView : BaseView

@property (nonatomic, strong) NSMutableArray *imageArray;
/// 最大限制数 (默认:10  当maxCount>imageArray.count时,允许添加本机相册)
@property (nonatomic, assign) NSInteger maxCount;
/// 是否允许删除(默认:NO 不可删除)
@property (nonatomic, assign) BOOL isDelete;
/// 一行几个Item(默认:3)
@property (nonatomic, assign) NSInteger itemCount;
/// 每个Item之间的距离(默认:8)
@property (nonatomic, assign) NSInteger itemSpace;
/// 每个section之间的距离(默认 上:0 左:0 下:0 右:0)
@property (nonatomic, assign) UIEdgeInsets sectionEdgeInsets;

/// cell高度发生改变时回调
- (void)viewHeightChangeBlock:(HeightBlock)newBlock;
/// image发生变化时调用
- (void)imageCountChangeBlock:(ImageCountBlock)newBlock;
/// 点击item回调
- (void)didCollectionItemBlock:(ItemBlock)newBlock;

@end
